package com.oil.petro.eshop.utils;

public class OrderStatusUtil {

    public static final int NEW = 1;
    public static final int IN_CART = 2;
    public static final int UNAVAILABLE  = 3;

    public static final String NEW_TOOLTIP = "New";
    public static final String IN_CART_TOOLTIP = "In cart";
    public static final String UNAVAILABLE_TOOLTIP = "Unavailable";

    public static final String NEW_ICON = "glyphicon glyphicon-plus";
    public static final String IN_CART_ICON = "glyphicon glyphicon-time";
    public static final String UNAVAILABLE_ICON = "glyphicon glyphicon-minus";

   static public String getOrderStatusIcon(int id) {
        String status = "";
        switch (id) {
            case NEW:
                status = NEW_ICON;
                break;
            case IN_CART:
                status = IN_CART_ICON;
                break;
            case UNAVAILABLE:
                status = UNAVAILABLE_ICON;
                break;
        }
        return status;
    }

     static public String getOrderStatusTooltip(int id) {
        String tooltip = "";
        switch (id) {
            case NEW:
                tooltip = NEW_TOOLTIP;
                break;
            case IN_CART:
                tooltip = IN_CART_TOOLTIP;
                break;
            case UNAVAILABLE:
                tooltip = UNAVAILABLE_TOOLTIP;
                break;
        }
        return tooltip;
    }

}
